let Sequelize = require("sequelize");

module.exports = function(sequelize, DataTypes) {
	let UserRole = sequelize.define("UserRole", {
		id: { type: Sequelize.INTEGER, primaryKey: true,autoIncrement: true },	
	}, {
		tableName: 'sys_user_role',
		comment: '用户角色对应关系表',
		underscored: true,
		'timestamps': true,
		'paranoid': true,
		'createdAt' : 'created_at',
		'updatedAt' : 'updated_at',
		classMethods: {
		    associate: function(models) {}
		},
		instanceMethods: {
			toJSON: function () {
			    let values = Object.assign({}, this.get());
			    return values;
			}
		}
	});
	return UserRole;
};
